package router

import (
	"gitee.com/crack007/goose/core/web"
	"gitee.com/crack007/udp-penetrate/src/api/controller"
	"gitee.com/crack007/udp-penetrate/src/common/middleware"
)

func ClientApi(httpServer *web.HttpServer) {
	client := &controller.ClientController{}
	msgRouter := httpServer.Engine.Group("/client")
	msgRouter.Use(middleware.JsonResponseMiddleware)
	msgRouter.GET("/connect", web.Action(client.Connect))
	msgRouter.POST("/msg", web.Action(client.SendMsg))
}
